/**
 * 
 */
package edu.wpi.cs509.messages.client;

import edu.wpi.cs509.representation.ClientGame;

/**
 * This class implements the server->client opponent-joined-the-game
 * message.
 * @author sparadis
 *
 */
public class MsgOpponentJoined extends MsgClientContext {

	/**
	 * The serialization version ID.
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * The new client game. 
	 */
	protected ClientGame cgame;
	
	/**
	 * Constructor. 
	 */
	public MsgOpponentJoined( ClientGame cGame ) {
		this.cgame = cGame;
	}
	
	/**
	 * Call the client's opponent-joined function. 
	 */
	public void rxExecute() {
		getCl().receiveOpponentJoined( cgame );
	}
}
